package com.agile.main;

import java.awt.Dimension;
import java.awt.Rectangle;
import java.awt.Toolkit;
import java.awt.event.WindowEvent;
import java.awt.event.WindowStateListener;
import javax.swing.JFrame;
import javax.swing.JRootPane;

/**
 *
 * @author Roderick
 */
public class Main {

    public static void main(String[] args) {
        Frame frame = new Frame() {
            {
                setMaximizedBounds(new Rectangle(0, 0));
                addWindowStateListener(new WindowStateListener() {
                    public void windowStateChanged(final WindowEvent e) {
                        if (e.getNewState() == MAXIMIZED_BOTH) {
                            setExtendedState(NORMAL);
                        }
                    }
                });
            }
        };

        frame.setTitle("Agile - CNC");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(940, 810);
        frame.setMinimumSize(new Dimension(940, 810));
        frame.setMaximumSize(new Dimension(940, 810));

        Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
        frame.setLocation(dim.width / 2 - frame.getSize().width / 2, dim.height / 2 - frame.getSize().height / 2);
        frame.setVisible(true);
    }

}
